package com.baizhi.entity;

import java.io.Serializable;
import java.util.List;

public class Category implements Serializable {
    private String categoryId;
    private String categoryName;
    private Integer levels;

    private Category parent;
    private List<Category> categories;

    private List<Book> books;
    public Category() {
    }

    public Category(String categoryId, String categoryName, Integer levels, Category parent) {
        this.categoryId = categoryId;
        this.categoryName = categoryName;
        this.levels = levels;
        this.parent = parent;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Category getParent() {
        return parent;
    }

    public void setParent(Category parent) {
        this.parent = parent;
    }

    public Integer getLevels() {
        return levels;
    }

    public void setLevels(Integer levels) {
        this.levels = levels;
    }

    public List<Category> getCategories() {
        return categories;
    }

    public void setCategories(List<Category> categories) {
        this.categories = categories;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }

    @Override
    public String toString() {
        return "Category{" +
                "categoryId='" + categoryId + '\'' +
                ", categoryName='" + categoryName + '\'' +
                ", levels=" + levels +
                ", parent=" + parent +
                ", categories=" + categories +
                ", books=" + books +
                '}';
    }
}
